// Testing Five 1.0 string functions

//----------------------------------------------------------------------------//

function Main()

   local cText := "Hello " + "world " + "of" + " Five 1.0" + " 32 bits"

   MsgInfo( cText )

   MsgInfo( Empty( cText ) )

   MsgInfo( Empty( "     " ) )

   MsgInfo( Asc( "a" ) )

   MsgInfo( At( "es", "Test" ) )

   MsgInfo( Chr( 97 ) )

   MsgInfo( Upper( "Test" ) )

   MsgInfo( Len( "ok" ) )

   MsgInfo( Lower( "Test" ) )

   MsgInfo( "*" + LTrim( "   No spaces on left" ) )

   MsgInfo( RTrim( "No spaces on right    " ) + "*" )

   MsgInfo( "*" + AllTrim( "   No spaces on both sides   " ) + "*" )

   MsgInfo( StrToken( "one,two,three", 2, "," ) )

   MsgInfo( SubStr( "Test", 2, 2 ) )

   MsgInfo( Left( "Test", 2 ) )

   MsgInfo( Right( "Test", 1 ) )

   MsgInfo( Replicate( "Test", 3 ) )

   MsgInfo( "*" + Space( 10 ) + "*" )

   MsgInfo( Stuff( "**Test**", 3, 4, "ok" ) ) // replaces 4 chars from 3 pos

return nil

//----------------------------------------------------------------------------//
